<%--
  Created by IntelliJ IDEA.
  User: Huajing
  Date: 2022/4/22
  Time: 22:34
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>test</title>
</head>
<body>
<div id="main"></div>
</body>
<script>
    // 基于准备好的dom，初始化echarts实例
    var myChart = echarts.init(document.getElementById('main'), null, {
        width: 600,
        height: 400
    });
    var option = {
        series: [{
            type: 'pie',
            data: [{
                value: 335,
                name: '直接访问'
            },
                {
                    value: 234,
                    name: '联盟广告'
                },
                {
                    value: 1548,
                    name: '搜索引擎'
                }
            ],
            radius: '50%'
        }]
    };
    myChart.setOption(option);
</script>

<div id="main"></div>
</body>
<script>
    // 基于准备好的dom，初始化echarts实例
    var myChart = echarts.init(document.getElementById('main'), null, {
        width: 600,
        height: 400
    });
    var option = {
        series: [{
            type: 'pie',
            data: [{
                value: 335,
                name: '直接访问'
            },
                {
                    value: 234,
                    name: '联盟广告'
                },
                {
                    value: 1548,
                    name: '搜索引擎'
                }
            ],
            radius: '50%'
        }]
    };
    myChart.setOption(option);
</script>

</html>
